detected(a, symbol) = a == symbol
detected(n::NumberedLines.NumberedLine, symbol) = detected(n.line, symbol)
detected(e::Expr, symbol) = any(e.args) do arg
    detected(arg, symbol)
end

MacroTools.walk(n::NumberedLines.NumberedLine, inner, outer) =
    NumberedLines.without_line_number(n) do line
        MacroTools.walk(line, inner, outer)
    end

MacroTools.prewalk(f, n::NumberedLines.NumberedLine) =
    NumberedLines.without_line_number(n) do line
        MacroTools.walk(f(line), x -> MacroTools.prewalk(f, x), identity)
    end
